import LoginPage from '@/views/LoginPage.vue'

export default [
    {
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
        name:'login',
        component:LoginPage
    },
    {
        path:'/home',
        name:'home',
        component:()=>import(/* webpackChunkName: "base" */ '@/views/HomePage.vue'),
        children:[
            {
                path:'welcome',
                name:'welcome',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/WelcomeView.vue'),
            },
            {
                path:'users',
                name:'users',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/UsersView.vue'),
            },
            {
                path:'roles',
                name:'roles',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/RolesView.vue'),
            },
            {
                path:'rights',
                name:'usrightsers',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/RightsView.vue'),
            },
            {
                path:'params',
                name:'params',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/ParamsView.vue'),
            },
            {
                path:'orders',
                name:'orders',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/OrdersView.vue'),
            },
            {
                path:'goods',
                name:'goods',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/GoodsView.vue'),
            },
            {
                path:'categories',
                name:'categories',
                component:()=>import(/* webpackChunkName: "base" */ '@/views/home/CategoriesView.vue'),
            }
        ]
    },
    // {
    //     path:'*',
    //     redirect:'/login'
    // }
]